using Catalog.Api.Features.CatalogItems.GetItems;
using Catalog.Api.Models;

namespace Catalog.Api.Features.CatalogItems;

internal static class Mapper
{
    public static CatalogItemResponse ToResponse(CatalogItem item) => new()
    {
        Id = item.Id,
        Name = item.Name,
        Description = item.Description,
        Price = item.Price,
        Stock = item.Stock,
        PictureUrl = item.PictureUrl,
        Category = item.Category,
        CreatedAt = item.CreatedAt
    };
}
